package com.whfc.ms.api.quality.service.impl;

import com.sun.xml.bind.v2.model.core.ID;
import com.whfc.common.result.PageData;
import com.whfc.ms.api.quality.service.MsQualityIssueService;
import com.whfc.quality.dto.QualityIssueDTO;
import com.whfc.quality.dto.QualityIssueTypeDTO;
import com.whfc.quality.param.QualityIssueAddParam;
import com.whfc.quality.param.QualityIssueEditParam;
import com.whfc.quality.param.QualityIssueTypeAddParam;
import com.whfc.quality.param.QualityIssueTypeEditParam;
import com.whfc.quality.service.QualityIssueService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 质量问题库 service
 *
 * @author : qzexing
 * @version : 1.0
 * @date : 2020-07-30 18:49
 */
@Service
public class MsQualityIssueServiceImpl implements MsQualityIssueService {

    @DubboReference(interfaceClass = QualityIssueService.class, version = "1.0.0")
    private QualityIssueService qualityIssueService;

    @Override
    public List<QualityIssueTypeDTO> issueTypeList(Integer deptId, String keyword) {
        return qualityIssueService.issueTypeList(deptId, keyword);
    }

    @Override
    public void addIssueType(QualityIssueTypeAddParam addParam) {
        qualityIssueService.addIssueType(addParam);
    }

    @Override
    public void editIssueType(QualityIssueTypeEditParam editParam) {
        qualityIssueService.editIssueType(editParam);
    }

    @Override
    public void delIssueType(Long issueTypeId) {
        qualityIssueService.delIssueType(issueTypeId);
    }

    @Override
    public List<QualityIssueDTO> issueList(Long issueTypeId) {
        return qualityIssueService.issueList(issueTypeId);
    }

    @Override
    public PageData<QualityIssueDTO> issueList(Long issueTypeId, Integer pageNum, Integer pageSize) {
        return qualityIssueService.issueList(issueTypeId, pageNum, pageSize);
    }

    @Override
    public void addIssue(QualityIssueAddParam addParam) {
        qualityIssueService.addIssue(addParam);
    }

    @Override
    public void editIssue(QualityIssueEditParam editParam) {
        qualityIssueService.editIssue(editParam);
    }

    @Override
    public void delIssue(Long issueId) {
        qualityIssueService.delIssue(issueId);
    }

    @Override
    public void disableOrEnabledIssue(Long issueId, Integer enable) {
        qualityIssueService.disableOrEnabledIssue(issueId, enable);
    }

    @Override
    public List<QualityIssueDTO> issueList(Integer deptId) {
        return qualityIssueService.issueList(deptId);
    }

    @Override
    public void deleteBatch(List<Integer> idList) {
        qualityIssueService.deleteBatch(idList);
    }
}
